package org.fioma.tree;

public abstract class SimpleNode<L extends Label<L>, I extends SimpleInternalNode<L, I, F, N>, F extends SimpleLeaf<L, I, F, N>, N extends Node<L, I, F, N>>
		implements Node<L, I, F, N> {

	private I parent;
	private L label;

	public SimpleNode(I parent, L label) {
		this.parent = parent;
		this.label = label;
	}

	@Override
	public I getParent() {
		return parent;
	}

	@Override
	public void setParent(I parent) {
		this.parent = parent;
	}

	@Override
	public L getLabel() {
		return label;
	}

	@Override
	public void setLabel(L label) {
		this.label = label;
	}

	@Override
	public boolean isRoot() {
		return getParent() == null;
	}

}
